package com.peng.rpc.api;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author Wonderson
 * @email wpp.ds@foxmail.com
 * @date 2022/2/28 20:49
 */
@Data
@NoArgsConstructor
public class HandShakeArg implements Serializable {

    private Person person;
    private String hello;

    public HandShakeArg(String name, String hello) {
        this.person = new Person(name);
        this.hello = hello;
    }

    public String getPersonName() {
        return this.person.getName();
    }

    @NoArgsConstructor
    @AllArgsConstructor
    @Data
    static class Person implements Serializable {
        String name;
    }
}
